package cn.itsource.mapper;

import cn.itsource.domain.Menu;
import cn.itsource.domain.Permission;
import cn.itsource.domain.Role;
import cn.itsource.query.RoleQuery;

import java.util.List;

public interface RoleMapper {

    void add(Role role);

    void update(Role role);

    void del(Long id);

    void delList(List ids);

    Role get(Long id);

    List<Role> getAll();

    List<Role> pageQuery(RoleQuery query);

    List<Permission> findpermissionsByRoleId(Long id);

    List<Menu> findmenusByRoleId(Long id);

    void delPermissionByRoleId(Long id);

    void addMenus(Role role);

    void delMenuByRoleId(Long id);

    void addPermissions(Role role);
}
